import Layout from '@/layout'

const purchaseRouter = {
  path: '/purchase',
  name: 'purchase-group',
  component: Layout,
  meta: { title: '采购报表', icon: 'tree', roles: ['m6300'] },
  children: [
    {
      path: 'day',
      component: (resolve) => require(['@/views/purchase-group/day'], resolve),
      name: 'PurchaseDayManage',
      remoteParam: { serviceName: 'bi', path: '/api/statistics/purchase/day/' },
      remoteUrl: '',
      meta: { title: '采购日报', roles: ['m6310'] }
    },
    {
      path: 'month',
      component: (resolve) => require(['@/views/purchase-group/month'], resolve),
      name: 'PurchaseMonthManage',
      remoteParam: { serviceName: 'bi', path: '/api/statistics/purchase/month/' },
      remoteUrl: '',
      meta: { title: '采购月报', roles: ['m6320'] }
    },
    {
      path: 'year',
      component: (resolve) => require(['@/views/purchase-group/year'], resolve),
      name: 'PurchaseYearManage',
      remoteParam: { serviceName: 'bi', path: '/api/statistics/purchase/year/' },
      remoteUrl: '',
      meta: { title: '采购年报', roles: ['m6330'] }
    }
  ]
}

export default purchaseRouter
